import java.util.HashSet;
import java.util.Scanner;

public class Test{
    public static void main(String[] args) {
        int count=0;
        HashSet<String>set=new HashSet<>();
        Scanner scanner=new Scanner(System.in);
           while(scanner.hasNextLine()){
               String s1=scanner.nextLine();
               String [] arr=s1.split(" ");
               for (String x:arr) {
                   set.add(x);
               }
           }
        System.out.println(set.size());
    }
    public static void main1(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int tmp=scanner.nextInt();
        int min=0;
        int max=0;
        int [] arr=new int[100000];
        arr[0]=0;
        arr[1]=1;
        for (int i = 2; i < arr.length ; i++) {
            arr[i]=arr[i-1]+arr[i-2];
            if(tmp<=arr[i]&&tmp>=arr[i-1]){
                 min=tmp-arr[i-1];
                 max=arr[i]-tmp;
                 break;
            }
        }
        int anwser=min<=max?min:max;
        System.out.println(anwser);
    }

}
